#pragma once

#define INITGUID

#include "engineobject.h"
#include <d3dx10.h>
#include "IEngineComponent.h"

#pragma comment(linker, "/INCLUDE:??0AmbientLightComponent@@QAE@XZ")

// {F840307F-3F46-4c67-94A6-7C6CF0B1627B}
DEFINE_GUID(AMBIENT_LIGHT_COMPONENT_GUID, 
0xf840307f, 0x3f46, 0x4c67, 0x94, 0xa6, 0x7c, 0x6c, 0xf0, 0xb1, 0x62, 0x7b);

class AmbientLightComponent :
	public IEngineComponent
{
public:
	AmbientLightComponent();
	AmbientLightComponent(D3DXVECTOR3 color, float intensity);
	~AmbientLightComponent(void);

	GUID getSystemIdentifier();
	GUID getComponentIdentifier();
	float getIntensity();
	void setIntensity(float intensity);
	D3DXVECTOR3 getColor();
	void setColor(D3DXVECTOR3 color);

	void Serialize(EnginePointer<ISerializerWriteContext>& context, char* name);
	static IEngineComponent* Deserialize(EnginePointer<ISerializerReadContext>& context);

	AUTO_SIZE;
private:
	D3DXVECTOR3 color;
	float intensity;
};
